package com.xcity.pomelo.response;

import java.util.List;

import com.xcity.db.entity.Employee;
import com.xcity.game.skill.SkillUtils;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class EmployeeRebornResponse extends Response {
	
	public long id; // 重生员工id
	public byte succ; // 1-成功，0-失败
	public SyncData data; // 改变的属性
	
	public static class SyncData {
		public int exp, level;
		public int qualityLvl;
		public int starLvl;
		public List<SkillV2Info> skills2;
	}
	
	public EmployeeRebornResponse(int serial, Employee employee, byte succ) {
		super(serial);
		this.id = employee.getId();
		this.succ = succ;
		SyncData data = new SyncData();
		data.level = 1;
		data.skills2 = SkillUtils.toResponse(employee);
		this.data = data;
	}

}
